package com.hospital;

import java.util.ArrayList;
import java.util.Scanner;

public class DepartmentOp {

    public void add(ArrayList<Department> departments) {
        Scanner sc = new Scanner(System.in);

        OUT: while (true) {
            System.out.println("请输入科室名称");
            String name = sc.next();
            for (int i = 0; i < departments.size(); i++) {
                if (name == departments.get(i).getName())
                    continue OUT;
            }
        }

    }

    public void handleDepartment(ArrayList<Department> departments) {
        Scanner sc = new Scanner(System.in);

        while (true) {

            System.out.println("------------科室管理--------------");
            System.out.println("1.新增科室");
            System.out.println("2.删除科室");
            System.out.println("3.编辑科室");
            System.out.println("4.查看科室");
            int type = sc.nextInt();

            switch (type) {
                case 1:

                    break;

                default:
                    break;
            }
        }
    }

}
